package my.test.proxyPattern;

public class IGamePlayerPorpxy implements IGamePlayer {
    private IGamePlayer gamePlayer = null;
    //通过构造函数传递对谁进行代练
    public IGamePlayerPorpxy(IGamePlayer _gamePlayer) {
        this.gamePlayer = _gamePlayer;
    }
    @Override
    public void login(String user, String password) {
        this.gamePlayer.login(user,password);
    }

    @Override
    public void killBoss() {
        this.gamePlayer.killBoss();
    }

    @Override
    public void upgrade() {
        this.gamePlayer.upgrade();
    }
}
